package com.hmall.mapper;

import com.hmall.model.MallAuctionHistory;
import com.hmall.util.MyMapper;
import com.hmall.vo.AuctionSelfVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MallAuctionHistoryMapper extends MyMapper<MallAuctionHistory> {

    /**
     * @Date 2018/12/26 15:56
     * @Param [flag, userId]
     * @return java.util.List<com.hmall.vo.AuctionSelfVo>
     * @Description  根据类型得出个人竞拍的信息 包括竞拍的编号，本次竞拍的最终价格，是否竞拍成功
     */
    List<AuctionSelfVo> selectSelfVoWithType(@Param("status") int flag, @Param("userId") Integer userId);

    /**
     * @Date 2018/12/28 9:50
     * @Param [success, fail, userId] 
     * @return java.util.List<com.hmall.vo.AuctionSelfVo>
     * @Description //TODO 得到是成功和失败的用户最终竞拍的信息项
     */
    List<AuctionSelfVo> selectSelfVoWithTypeExtra(@Param("userId") Integer userId);

    Integer selectByUserIdAndPackageNo(@Param("userId") Integer userId, @Param("packageNo") Long packageNo);

    void myInsert(@Param("mallAuctionHistory") MallAuctionHistory mallAuctionHistory);
}